class SweetPotato:
    def __init__(self):
        self.time = 0
        self.status = '生的'
        self.condiment = []

    def cook(self, time):
        self.time += time
        if 3 > self.time >= 0:
            self.status = '生的'
        elif 3 <= self.time < 5:
            self.status = '半生不熟'
        elif 5 <= self.time < 8:
            self.status = '熟的'
        elif self.time >= 8:
            self.status = '烤糊了'

    def add_condiment(self, cond):
        self.condiment.append(cond)

    def __str__(self):
        return f'该地瓜烤了{self.time}分钟，状态是{self.status},t添加的调料有：'

    if __name__ =='__main__':
        sp1= SweetPotato()
        sp1.cook(2)
        sp1.add_condiment('香油')
        print(sp1)
        sp1.cook(5)
        sp1.add_condiment('孜然')
        print(sp1)